package com.itheima.Demo01;

public class Demo同步代码块解决 {
    public static void main(String[] args) {
        //创建子类对象;
        AAA ab = new AAA();
        //创建Thread对象;
        Thread mt = new Thread(ab);
        //修改线程名称;
        mt.setName("窗口一");
        mt.start();
        //再创建一个Tread对象;
        Thread mt2 = new Thread(ab);
        mt2.setName("窗口二");
        mt2.start();
    }
}
